Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add warning metadata and summarisation result to response type #152

Merged
merged 2 commits into from
Jul 19, 2023

Conversation

lukeocodes
Copy link
Contributor

Add typing for new response format supporting summarisation results and warning metadata.
e.g. output

{
  "metadata": {
    ...
    "warnings": [
      {
        "parameter": "summarize",
        "type": "unsupported_language",
        "message": "Summarization isn’t supported for <detected language>."
      }
    ]
  },
  "results": {
    ...
    "summary": {
      "result": "failure",
      "short": "The summarization feature is currently only available in English. Please check out our API documentation for more details."
    }
  }
}

and

{
  "metadata": {
    ...
    "warnings": [
      {
        "parameter": "filler_words",
        "type": "unsupported_model",
        "message": "Filler Words is not available for the specified model. For supported models, see our docs: <link>"
      },
      {
        "parameter": "numerals",
        "type": "deprecated",
        "message": "The numerals parameter is deprecated. Please use smart_format=true instead. For more information, see our docs: <link>"
      }
    ]
  },
  "results": {
    ...
  }
}

@lukeocodes lukeocodes added the enhancement New feature or request label Jul 13, 2023
@lukeocodes lukeocodes self-assigned this Jul 13, 2023
@lukeocodes lukeocodes merged commit 1288778 into main Jul 19, 2023
1 check passed
@lukeocodes lukeocodes deleted the lo/sumv2-ga-prep branch July 19, 2023 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants